package com.hwadee.teachingprocessmanagementsystem.dto.teacher;

import com.hwadee.teachingprocessmanagementsystem.dto.DepartmentDto;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
 * @Description:
 * @Author：keyixuan
 * @Package：com.hwadee.teachingprocessmanagementsystem.dto.teacher
 * @Project：teaching-process-management-system-back
 * @name：TeacherCourseStandardDto
 * @Date：2024/7/17 10:26
 * @Filename：TeacherCourseStandardDto
 */
@Data
public class TeacherCourseStandardDto implements Serializable {
    /**
     * @Description:
     * @Author：keyixuan
     * @Package：com.hwadee.teachingprocessmanagementsystem.dto.teacher
     * @Project：teaching-process-management-system-back
     * @name：TeacherCourseStandard
     * @Date：2024/7/17 10:27
     * @Filename：TeacherCourseStandard
     */
    // 系部dto，存储所有系部名称列表
    private DepartmentDto departmentDto;
    // 展示列表
    private List<TeacherCourseStandard> teacherCourseStandardList;

    public void addTeacherCourseStandard(TeacherCourseStandard teacherCourseStandard) {
        if (this.teacherCourseStandardList == null) {
            this.teacherCourseStandardList = new ArrayList<TeacherCourseStandard>();
        }
        this.teacherCourseStandardList.add(teacherCourseStandard);
    }
    public void addTeacherCourseStandard(String departmentName, String courseId, String courseName, Integer courseHour, Integer credits, String type) {
        TeacherCourseStandard teacherCourseStandard = new TeacherCourseStandard();
        teacherCourseStandard.setDepartmentName(departmentName);
        teacherCourseStandard.setCourseId(courseId);
        teacherCourseStandard.setCourseName(courseName);
        teacherCourseStandard.setCourseHour(courseHour);
        teacherCourseStandard.setCredits(credits);
        teacherCourseStandard.setType(type);
        this.addTeacherCourseStandard(teacherCourseStandard);
    }

    /**
     * 获取学生课程标准的一条记录
     * @return
     */
    public TeacherCourseStandard getTeacherCourseStandard() {
        return new TeacherCourseStandard();
    }
}
    /**
     * 教师课程标准显示列表
     */
    @Data
    class TeacherCourseStandard implements Serializable {
        // 开课单位
        private String departmentName;
        // 课程编号
        private String courseId;
        // 课程名称
        private String courseName;
        // 总学时
        private Integer courseHour;
        // 学分
        private Integer credits;
        // 课程类别
        private String type;
    }

